#ifndef DISTANCEMODEL_H
#define DISTANCEMODEL_H

#include <QSqlTableModel>

#include "systemcontroller.h"

class DistanceModel : public QSqlTableModel
{
public:
    DistanceModel(SystemController *controller, QObject * parent = 0, QSqlDatabase db = QSqlDatabase());

    //Public Static const
    static const int ID_COLUMN = 0;
    static const int COMPETITION_ID_COLUMN = 1;
    static const int LENGTH_COLUMN = 2;
    static const int COMMENT_COLUMN = 3;
    static const int MIN_AGE_COLUMN = 4;
    static const int MAX_AGE_COLUMN = 5;

protected:
    QString selectStatement() const;

private:
    SystemController *systemController;

};

#endif // DISTANCEMODEL_H
